﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace VSIXUtilities.DataObjects
{
    [DebuggerDisplay("Extension = {Extension}, DocumentationNotation = {DocumentationNotation}, TagName = {TagName}, EmptyDocumentationString = {EmptyDocumentationString}")]
    public class LanguageSpecifications
    {
        public LanguageSpecifications(string Extension, string DocumentationNotation, string TagName)
        {
            this.Extension = Extension;
            this.DocumentationNotation = DocumentationNotation;
            this.TagName = TagName;
            if (TagName == string.Empty)
            {
                StartTag = string.Empty;
                EndTag = string.Empty;
            }
            else
            {
                StartTag = "<" + TagName + ">";
                EndTag = "</" + TagName + ">";
            }
            EmptyDocumentationString = StartTag + EndTag;
        }

        public string Extension
        {
            get;
            private set;
        }

        public string DocumentationNotation
        {
            get;
            private set;
        }

        public string TagName
        {
            get;
            private set;
        }

        public string StartTag
        {
            get;
            private set;
        }

        public string EndTag
        {
            get;
            private set;
        }

        public string EmptyDocumentationString
        {
            get;
            private set;
        }

        public string GetRawDocumentation(string Input)
        {
            return StartTag + Input + EndTag;
        }
    }
}
